package com.ny.kind.five;

import java.util.ArrayList;
import java.util.List;

public class Testtt {
    public static void main(String[] args) {
        Emp emp1 = new Emp();
        emp1.setNumber("1001");
        emp1.setName = ("瑶");
        emp1.setAge(19);
        Emp emp2 = new Emp();
        emp2.setNumber("1002");
        emp2.setName("朵利亚");
        emp2.setAge(20);
        Emp emp3 = new Emp();
        emp3.setNumber("1003");
        emp3.setName("明世隐");
        emp3.setAge(21);
        System.out.println(emp3.getNumber());
        System.out.println(emp3.getName());
        System.out.println(emp3.getAge());
        List<Emp> list = new ArrayList();
        list.add(emp1);
        list.add(emp2);
        list.add(emp3);
        System.out.println("集合的元素");
        int i;
        for (i = 1; i < list.size(); i++) {
            System.out.println(list.get(i));
        }
    }
    }
